﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="pgFacilitador.aspx.cs" Inherits="EGuayas.Web.Licenciamiento.admin.tabs.pgFacilitador" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title><link  href="~/Resources/css/Style.css"  rel="stylesheet" /> 
    <!-- Load Ext JS --> <script src="../../../Resources/js/Global.js"></script>
       
</head>
<body>    
   <ext:ResourceManager ID="ResourceManager1" runat="server" />
    <ext:Viewport ID="Viewport1" runat="server" Layout="BorderLayout">
    <Items>
        <ext:FormPanel ID="FormPanel1" runat="server" Region="Center" Layout="VBoxLayout" >
                    <LayoutConfig>
                            <ext:VBoxLayoutConfig Align="Stretch" />
                    </LayoutConfig>
                   <TopBar>
                            <ext:Toolbar ID="Toolbar4" runat="server">
                                <Items>
                                    <ext:UserControlLoader ID="UserControlLoader1" runat="server" Path="~/Licenciamiento/ucInfoProyecto.ascx"  />                        
                                    <ext:ToolbarFill />
                                    <ext:Button ID="ShowTab1" runat="server" Text="Mostrar Documentos"  Disabled="true" Icon="PageWhiteStack">
                                        <Listeners>
                                            <Click Handler="#{TabPanel1}.addTab(#{Tab1},0);this.setDisabled(true);" />
                                        </Listeners>
                                    </ext:Button>
                                   <ext:Button ID="ShowTab2" runat="server" Text="Mostrar Tareas"  Icon="Wrench">
                                        <Listeners>
                                            <Click Handler="#{TabPanel1}.addTab(#{Tab2},1);this.setDisabled(true);" />
                                        </Listeners>
                                    </ext:Button>
                        
                                  
                              </Items>
                            </ext:Toolbar>
                    </TopBar>

                    <Items>
                         <ext:TabPanel ID="TabPanel1" runat="server" Flex="1"  TabPosition="Left">
                         <Items>
                                <ext:Panel ID="Tab1" Title="Documentos" runat="server" Closable="true" CloseAction="Hide"  Icon="PageWhiteStack"  Layout="Fit">
                                    <Items>
                                             <ext:Panel ID="Panel1" 
                            runat="server" 
                            Title="Información sobre la asignación del facilitador"
                            Icon="PageWhiteStack"
                            Margins="5 5 5 5" 
                            Flex="1"
                            Layout="FitLayout"
                            BodyBorder="0"                           
                            Collapsible="true">
                            <Items>
                                  <ext:GridPanel
                                            ID="GridPanel1"
                                            runat="server" 
                                            Width="620" 
                                            Height="90">
                                            <Store>
                                                <ext:Store ID="Store1" runat="server">
                                                    <Model>
                                                        <ext:Model ID="Model1" runat="server">
                                                            <Fields>
                                                                <ext:ModelField Name="IntField" Type="Int" />
                                                                <ext:ModelField Name="ComboField" Type="Int" />
                                                                <ext:ModelField Name="TextField" Type="String" />
                                                                <ext:ModelField Name="DateField" Type="Date" />
                                                            </Fields>
                                                        </ext:Model>
                                                    </Model>                                      
                                                    <Proxy>
                                                        <ext:PageProxy DirectFn="App.direct.BindData">
                                                            <Reader>
                                                                <ext:ArrayReader />
                                                            </Reader>
                                                        </ext:PageProxy>
                                                    </Proxy>
                                                </ext:Store>
                                            </Store>
                                            <ColumnModel ID="ColumnModel1" runat="server">
                                                <Columns>
                                                    <ext:Column ID="Column1" runat="server" Text="Descripción" DataIndex="TextField" Flex="1" />
                                                    <ext:DateColumn ID="DateColumn2" runat="server" Text="Fecha de ingreso" Width="95" DataIndex="DateField" Format="H:mm:ss" />
                                                    <ext:Column ID="Column6" runat="server" Text="Tipo" DataIndex="TextField" Flex="1" />
                                                    <ext:CommandColumn ID="CommandColumn0" runat="server" Width="120" Text="">
                                                                    <Commands>
                                                                        <ext:GridCommand Icon="Zoom" CommandName="View" Text="Vizualizar">
                                                                            <ToolTip Text="Vizualizar" />
                                                                        </ext:GridCommand>
                                                                    </Commands>
                                                                    <PrepareToolbar />
                                                                    <Listeners>
                                                                         <Command Handler="AppGlobalJs.showPdf('../../..',record.data.urlPdf);" />
                                                                    </Listeners>                                                       
                                                    </ext:CommandColumn>
                                                    <ext:CommandColumn ID="CommandColumn1" runat="server" Width="120" Text="Contestar" Align="Center">
                                                                    <Commands>
                                                                        <ext:GridCommand Icon="ServerEdit" CommandName="Edit" >
                                                                            <ToolTip Text="Contestar" />
                                                                        </ext:GridCommand>
                                                                    </Commands>
                                                                    <PrepareToolbar />
                                                                    <Listeners>
                                                                        <Command Handler="AppGlobalJs.showWin(#{winComentario});" />
                                                                    </Listeners>                                                       
                                                     </ext:CommandColumn>                                                    
                                                   
                                                </Columns>
                                             </ColumnModel> 
                                             <Plugins>
                                                <ext:RowExpander ID="RowExpander1" runat="server">
                                                    <Loader ID="Loader1" runat="server" DirectMethod="#{DirectMethods}.GetGrid" Mode="Component">
                                                        <LoadMask ShowMask="true" />
                                                        <Params>
                                                            <ext:Parameter Name="id" Value="this.record.getId()" Mode="Raw" />
                                                        </Params>
                                                    </Loader>
                                                </ext:RowExpander>
                                            <ext:BufferedRenderer ID="BufferedRenderer1" runat="server" />
                                            </Plugins>   
                                            <View>
                                                <ext:GridView ID="GridView2" runat="server" TrackOver="false" />
                                            </View>                    
                                        </ext:GridPanel>                               
                            </Items>
                        </ext:Panel>                                         
                                     </Items>
                                    <Listeners>
                                        <Close Handler="#{ShowTab1}.setDisabled(false);" />
                                    </Listeners>
                                </ext:Panel>
                                <ext:Panel ID="Tab2" Title="Tareas" runat="server" Closable="true" CloseAction="Hide"  Icon="Wrench" Layout="Fit">
                                        <Items>
                                              <ext:FormPanel
                            ID="FormPanel2"
                            runat="server" 
                            Title="Información sobre la vista preliminar por parte del facilitador" 
                            Icon="Report"
                            Margins="5 5 5 5" 
                            Flex="1"
                            Layout="FitLayout"
                            BodyBorder="0"
                            Collapsed="true"                       
                            Collapsible="true">  
                            <TopBar>
                                <ext:Toolbar ID="Toolbar3" runat="server">
                                    <Items>
                                        <ext:ToolbarFill ID="ToolbarFill2" runat="server" />
                                        <ext:Button 
                                            ID="Button3"
                                            runat="server" 
                                            Text="Agregar Informe" 
                                            Icon="ReportEdit"
                                             OnClientClick="AppGlobalJs.showWin(#{winAddInforme})">                                            
                                            <Listeners>                     
                                            </Listeners>
                                        </ext:Button>
                                    </Items>
                                </ext:Toolbar>
                            </TopBar>
                            <Items>
                                       <ext:GridPanel
                                            ID="GridPanel3"
                                            runat="server" 
                                            Width="620" 
                                            Height="90">
                                            <Store>
                                                <ext:Store ID="Store3" runat="server">
                                                    <Model>
                                                        <ext:Model ID="Model3" runat="server">
                                                            <Fields>
                                                                <ext:ModelField Name="booleanCol" Type="Boolean" />
                                                                <ext:ModelField Name="IntField" Type="Int" />
                                                                <ext:ModelField Name="ComboField" Type="Int" />
                                                                <ext:ModelField Name="TextField" Type="String" />
                                                                <ext:ModelField Name="DateField" Type="Date" />
                                                            </Fields>
                                                        </ext:Model>
                                                    </Model>                                      
                                                    <Proxy>
                                                        <ext:PageProxy DirectFn="App.direct.BindData">
                                                            <Reader>
                                                                <ext:ArrayReader />
                                                            </Reader>
                                                        </ext:PageProxy>
                                                    </Proxy>
                                                </ext:Store>
                                            </Store>
                                            <ColumnModel ID="ColumnModel3" runat="server">
                                                <Columns>
                                                    <ext:Column ID="Column5" runat="server" Text="Tecnico" DataIndex="TextField" Flex="1" />
                                                    <ext:DateColumn ID="DateColumn4" runat="server" Text="Fecha Inicio" Width="95" DataIndex="DateField" Format="H:mm:ss" />                                                    
                                                    <ext:Column ID="Column3" runat="server" Text="Tipo" DataIndex="TextField" Flex="1" />
                                                    <ext:CommandColumn ID="CommandColumn3" runat="server" Width="120" Text="">
                                                                    <Commands>
                                                                        <ext:GridCommand Icon="Zoom" CommandName="View" Text="Vizualizar">
                                                                            <ToolTip Text="Vizualizar" />
                                                                        </ext:GridCommand>
                                                                    </Commands>
                                                                    <PrepareToolbar />
                                                                    <Listeners>
                                                                           <Command Handler="AppGlobalJs.showPdf('../../..',record.data.urlPdf);" />
                                                                    </Listeners>                                                       
                                                    </ext:CommandColumn>
                                                    <ext:CommandColumn ID="CommandColumn2" runat="server" Width="80">
                                                        <Commands>
                                                            <ext:SplitCommand Icon="ArrowDown" CommandName="Estado" Text="Calificar">
                                                                <Menu EnableScrolling="false">
                                                                    <Items>
                                                                        <ext:MenuCommand Text="Aceptar" Icon="ArrowRight" CommandName="Item1" >
                                                                        </ext:MenuCommand>
                                                                        <ext:MenuCommand Text="Correguir" Icon="ArrowRight" CommandName="Item2">                                                                            
                                                                        </ext:MenuCommand>                                                                     
                                                                    </Items>
                                                                  </Menu>
                                                                <ToolTip Text="Seleccione opción" />
                                                            </ext:SplitCommand>
                                                        </Commands>
                                                            <Listeners>
                                                                <Command Handler="if (command=='Item1' || command=='Estado'){if (command!='Estado')Ext.Msg.alert('Aviso', 'Correcto!');} else {AppGlobalJs.showWin(#{winObs});}" />
                                                            </Listeners>
                                                    </ext:CommandColumn>
                                                </Columns>                                            

                                            </ColumnModel> 
                                              <Plugins>
                                                <ext:RowExpander ID="RowExpander2" runat="server">
                                                    <Loader ID="Loader2" runat="server" DirectMethod="#{DirectMethods}.GetGrid" Mode="Component">
                                                        <LoadMask ShowMask="true" />
                                                        <Params>
                                                            <ext:Parameter Name="id" Value="this.record.getId()" Mode="Raw" />
                                                        </Params>
                                                    </Loader>
                                                </ext:RowExpander>
                                            <ext:BufferedRenderer ID="BufferedRenderer2" runat="server" />
                                            </Plugins>   
                                            <View>
                                                <ext:GridView ID="GridView1" runat="server" TrackOver="false" />
                                            </View>                 
                                        </ext:GridPanel>
                            </Items>
                        </ext:FormPanel>  
                                        </Items>
                                    <Listeners>
                                        <Close Handler="#{ShowTab2}.setDisabled(false);" />
                                    </Listeners>
                                </ext:Panel>   
                         </Items>
                        <Bin></Bin>                       
                        
                </ext:TabPanel>                    
                   </Items>
                   <BottomBar>
                     <ext:StatusBar 
                            ID="StatusBar2" 
                            runat="server"
                            StatusAlign="Left">
                            <Items>
                                
                                <ext:ToolbarTextItem ID="ToolbarTextItem1" runat="server" Text="Paso 5/9" Cls="ux-bold-text-item"  Margin="15"/>
                            </Items>
                        </ext:StatusBar>
                    </BottomBar> 
       </ext:FormPanel>

        
        <ext:Window 
            ID="winDocumento" 
            runat="server"            
            Icon="Attach"
            Height="200" 
            Width="350"
            ButtonAlign="Center"
            BodyStyle="background-color: #fff;" 
            BodyPadding="5"            
            hidden="true" 
            closeaction="Hide">
            <Content>
                <ext:FormPanel 
                    ID="forPanelDoc" 
                    Border="false"
                    runat="server"
                    Width="330"            
                    BodyPadding="5"
                    Layout="Form">
                     <Defaults>
                <ext:Parameter Name="anchor" Value="95%" Mode="Value" />
                <ext:Parameter Name="allowBlank" Value="false" Mode="Raw" />
                <ext:Parameter Name="msgTarget" Value="side" Mode="Value" />
            </Defaults>
            <Items>
                <ext:TextField ID="PhotoName" runat="server" FieldLabel="Nombre" />
                <ext:FileUploadField 
                    ID="FileUploadField1" 
                    runat="server" 
                    EmptyText="Seleccione documento"
                    FieldLabel="Documento"
                    ButtonText=""
                    Icon="ImageAdd"
                    />
                <ext:TextArea runat="server" FieldLabel="Descripción" />
                </Items>
                    <Listeners>
                        <ValidityChange Handler="#{btnWinDocOk}.setDisabled(!valid);" />
                    </Listeners>
                </ext:FormPanel>
            </Content>
            <Buttons>
                  <ext:Button ID="btnWinDocOk" runat="server" Text="Aceptar" Disabled="true">
                    <DirectEvents>
                        <Click 
                            OnEvent="UploadClick"
                            Before="if (!#{forPanelDoc}.getForm().isValid()) { return false; } 
                                Ext.Msg.wait('Uploading your photo...', 'Uploading');"
                                
                            Failure="Ext.Msg.show({ 
                                title   : 'Error', 
                                msg     : 'Error during uploading', 
                                minWidth: 200, 
                                modal   : true, 
                                icon    : Ext.Msg.ERROR, 
                                buttons : Ext.Msg.OK 
                            });">
                           <EventMask ShowMask="True"></EventMask>
                        </Click>
                    </DirectEvents>
                </ext:Button>
                  <ext:Button ID="btnWinClose" runat="server" Text="Aceptar"  OnClientClick="AppGlobalJs.closeWin(#{winDocumento})">
                    <Listeners>                     
                    </Listeners>
                </ext:Button>
            </Buttons>
            <Listeners>
                <BeforeHide Handler="#{forPanelDoc}.getForm().reset();"></BeforeHide>              
            </Listeners>
        </ext:Window>
        <ext:Window 
            ID="winVisor" 
            runat="server"            
            Icon="Zoom"
            Height="185" 
            Width="350"
            ButtonAlign="Center"
            BodyStyle="background-color: #fff;" 
            BodyPadding="5"            
            hidden="true" 
            closeaction="Hide">
            <Content>
                <ext:FormPanel 
                    ID="forPanelComentario" 
                    Border="false"
                    runat="server"
                    Width="330"            
                    BodyPadding="5"
                    Layout="Form">
                    <FieldDefaults LabelWidth="75" LabelPad="20" LabelSeparator="" />
                    <Items>   </Items>
                    <Listeners>
                        <ValidityChange Handler="#{btnWinComentariOk}.setDisabled(!valid);" />
                    </Listeners>
                </ext:FormPanel>
            </Content>
            <Buttons>
                  <ext:Button ID="btnWinComentariOk" runat="server" Text="Aceptar"  OnClientClick="AppGlobalJs.closeWin(#{winVisor})">
                    <Listeners>                     
                    </Listeners>
                </ext:Button>
            </Buttons>
            <Listeners>
                <BeforeHide Handler="#{forPanelComentario}.getForm().reset();"></BeforeHide>              
            </Listeners>
        </ext:Window>
        <ext:Window 
            ID="winComentario" 
            runat="server"            
            Icon="ServerEdit"
            Height="450" 
            Width="620" 
            ButtonAlign="Center"
            BodyStyle="background-color: #fff;" 
            BodyPadding="5"            
            hidden="true" 
            closeaction="Hide"
             Layout="FormLayout"
            >
            <Content>
                 
                               <ext:Panel ID="Panel4" runat="server" Border="false" >
	                                <Items>
		                                <ext:Panel 
			                                ID="PanelContEditor"
			                                runat="server" 
			                                Height="200" 
                                            Width="610" 
			                                Html="" 
			                                BodyPadding="6"                                         
			                                Title="Redactar oficio para promotor">            
			                                <TopBar>
				                                <ext:Toolbar ID="Toolbar1" runat="server">
					                                <Items>
						                                <ext:Button 
							                                ID="btnEditEditor" 
							                                runat="server" 
							                                Text="Editar" 
							                                Icon="Pencil">
							                                <Listeners>
								                                <Click Handler="this.setDisabled(true);#{btnSaveEditor}.setDisabled(false);#{PanelEditor}.startEdit(#{PanelContEditor}.getBody());" />
							                                </Listeners>
						                                </ext:Button>
						                                <ext:Button 
							                                ID="btnSaveEditor" 
							                                runat="server" 
							                                Text="Grabar" 
							                                Icon="Disk" 
							                                Disabled="true">
							                                <Listeners>
								                                <Click Handler="this.setDisabled(true);#{btnEditEditor}.setDisabled(false);#{PanelEditor}.completeEdit();" />
							                                </Listeners>
						                                </ext:Button>    
					                                </Items>
				                                </ext:Toolbar>
			                                </TopBar>
		                                </ext:Panel>
		                                <ext:Editor 
			                                ID="PanelEditor" 
			                                runat="server"
			                                HtmlDecode="true"
			                                UseHtml="true"                                     
			                                AutoSize="true"     
			                                Alignment="tl-tl?"                    
			                                AllowBlur="false"
			                                Shadow="False">
			                                <AutoSizeConfig Width="BoundEl" Height="BoundEl" />
			                                <Field>
				                                <ext:HtmlEditor ID="HtmlEditor1" runat="server" />
			                                </Field>
			                                <Listeners>
				                                <StartEdit Handler="this.field.iframeEl.setHeight(this.field.getHeight() - this.field.getToolbar().getHeight() - 4); this.field.textareaEl.setHeight(this.field.getHeight() - this.field.getToolbar().getHeight() - 4);" Delay="10" />
			                                </Listeners>
		                                </ext:Editor>
	                                </Items>
	                                <Listeners>
		                                <Deactivate Handler="#{btnEditEditor}.setDisabled(false);#{btnSaveEditor}.setDisabled(true);#{PanelEditor}.completeEdit();" />
	                                </Listeners>
                               </ext:Panel>
                             
                               <ext:FormPanel
                                    ID="frmSettings"
                                    Width="610" 
                                    runat="server" 
                                    Title="Documentos Adjuntos" 
                                    Icon="PageWhiteStack"

                                    BodyBorder="7"                          
                                    Collapsible="true">                           
                                    <TopBar>
                                        <ext:Toolbar ID="Toolbar2" runat="server">
                                            <Items>
                                              <ext:ToolbarFill ID="ToolbarFill1" runat="server" />
                                                <ext:Button 
                                                    ID="btnForm"
                                                    runat="server" 
                                                    Text="Adjuntar" 
                                                    Icon="Attach"
                                                    OnClientClick="AppGlobalJs.showWin(#{winDocumento})">                                            
                                                    <Listeners>                     
                                                    </Listeners>
                                                </ext:Button>
                                                  
                                            </Items>
                                        </ext:Toolbar>
                                    </TopBar>
                                    <Items>
                                       <ext:GridPanel
                                            ID="GridPanel2"
                                            runat="server"
                                           
                                            Height="90">
                                            <Store>
                                                <ext:Store ID="Store2" runat="server">
                                                    <Model>
                                                        <ext:Model ID="Model2" runat="server">
                                                            <Fields>
                                                                <ext:ModelField Name="booleanCol" Type="Boolean" />
                                                                <ext:ModelField Name="IntField" Type="Int" />
                                                                <ext:ModelField Name="ComboField" Type="Int" />
                                                                <ext:ModelField Name="TextField" Type="String" />
                                                                <ext:ModelField Name="DateField" Type="Date" />
                                                                 <ext:ModelField Name="TextField2" Type="String" />
                                                            </Fields>
                                                        </ext:Model>
                                                    </Model>                                      
                                                    <Proxy>
                                                        <ext:PageProxy DirectFn="App.direct.BindData">
                                                            <Reader>
                                                                <ext:ArrayReader />
                                                            </Reader>
                                                        </ext:PageProxy>
                                                    </Proxy>
                                                </ext:Store>
                                            </Store>
                                            <ColumnModel ID="ColumnModel2" runat="server">
                                                <Columns>
                                                    <ext:Column ID="Column4" runat="server" Text="Nombre" DataIndex="TextField" Flex="1"/>
                                                    <ext:Column ID="Column10" runat="server" Text="Decripción" DataIndex="TextField" /> 
                                                    <ext:DateColumn ID="DateColumn1" runat="server" Text="Fecha" Width="95" DataIndex="DateField" Format="H:mm:ss" />
                                                    <ext:Column ID="Column11" runat="server">
                                                        <Commands>
                                                            <ext:ImageCommand CommandName="Edit" Icon="Cross" Text="Eliminar">
                                                                <ToolTip Text="Eliminar" />
                                                            </ext:ImageCommand>
                                                        </Commands>
                                                        <Listeners>
                                                              <Command Handler="Ext.Msg.alert('Aviso', 'Eliminado Exitosamente!');" />
                                                        </Listeners>
                                                    </ext:Column>                                             
                                                </Columns>
                                            </ColumnModel> 
                                           <Plugins>

                                           <ext:BufferedRenderer ID="BufferedRenderer3" runat="server" />
                                            </Plugins>   
                                            <View>
                                                <ext:GridView ID="GridView3" runat="server" TrackOver="false" />
                                            </View>                                                                
                                        </ext:GridPanel>
                                       </Items>
                                </ext:FormPanel>    
                            
                          
                 
            </Content>
            <Buttons>
                <ext:Button ID="Button1" runat="server" Text="Aceptar"  Disabled="true"
                    FormBind="true">
                    <Listeners>
                        <Click Handler="if (#{forPanelComentario}.getForm().isValid()) {Ext.Msg.alert('Aviso', 'Almaceno Exitosamente!');AppGlobalJs.closeWin(#{winComentario});}
                            else{Ext.Msg.show({icon: Ext.MessageBox.ERROR, msg: 'FormPanel es incorrecto', buttons:Ext.Msg.OK});}" />
                    </Listeners>
                </ext:Button>
                <ext:Button ID="Button2" runat="server" Text="Cancelar"  OnClientClick="AppGlobalJs.closeWin(#{winComentario})">
                    <Listeners>                    
                    </Listeners>
                </ext:Button>
            </Buttons>
            <Listeners>
                <BeforeHide Handler="#{forPanelComentario}.getForm().reset();"></BeforeHide>              
            </Listeners>
        </ext:Window>
        <ext:Window 
            ID="winObs" 
            runat="server"            
            Icon="PageFind"
            Height="185" 
            Width="350"
            ButtonAlign="Center"
            BodyStyle="background-color: #fff;" 
            BodyPadding="5"            
            hidden="true"
            closeaction="Hide">
            <Content>
                <ext:FormPanel ID="forPanelObs"                   
                    Border="false"
                    runat="server"
                    Width="330"            
                    BodyPadding="5"
                    Layout="Form">
                    <FieldDefaults LabelWidth="75" LabelPad="20" LabelSeparator="" />
                    <Items>   
                         <ext:Panel ID="Panel3" runat="server" Border="false" Layout="Form" ColumnWidth=".5" LabelAlign="Top">
                            <Defaults>
                                <ext:Parameter Name="AllowBlank" Value="false" Mode="Raw" />
                                <ext:Parameter Name="MsgTarget" Value="side" />
                            </Defaults>
                            <Items> 
                                <ext:ComboBox ID="ComboBox1" 
                                    runat="server"
                                    Width="250"
                                    Editable="false"
                                    DisplayField="state"
                                    FieldLabel="Categoria"
                                    ValueField="abbr"
                                    TypeAhead="true" 
                                    QueryMode="Local"
                                    ForceSelection="true"
                                    TriggerAction="All"
                                    EmptyText="Seleccione a categoria"
                                    SelectOnFocus="true">                        
                                    <Store>
                                        <ext:Store ID="stoCateg" runat="server">
                                            <Model>
                                                <ext:Model ID="Model6" runat="server">
                                                    <Fields>
                                                        <ext:ModelField Name="abbr" />
                                                        <ext:ModelField Name="state" />
                                                        <ext:ModelField Name="nick" />
                                                     </Fields>
                                                </ext:Model>
                                            </Model>            
                                        </ext:Store>
                                    </Store>
                                    <ListConfig>
                                        <ItemTpl ID="ItemTpl1" runat="server">
                                            <Html>
						                        <div class="list-item">
							                            <h3>{state}</h3>
							                            {nick:ellipsis(15)}
						                        </div>
				                            </Html>    
                                        </ItemTpl>
                                    </ListConfig>
                                </ext:ComboBox> 
                                 <ext:TextArea FieldLabel="Observación"  AnchorHorizontal="90%" AnchorVertical="100%"></ext:TextArea>
                            </Items>
                        </ext:Panel>
                    </Items>
                    <Listeners>
                        <ValidityChange Handler="#{btnWinObsOk}.setDisabled(!valid);" />
                    </Listeners>
                </ext:FormPanel>
            </Content>
            <Buttons>
                <ext:Button ID="btnWinObsOk" runat="server" Text="Aceptar"  Disabled="true"
                    FormBind="true">
                    <Listeners>
                        <Click Handler="if (#{forPanelObs}.getForm().isValid()) {Ext.Msg.alert('Aviso', 'Almaceno Exitosamente!');AppGlobalJs.closeWin(#{winObs});}
                            else{Ext.Msg.show({icon: Ext.MessageBox.ERROR, msg: 'FormPanel es incorrecto', buttons:Ext.Msg.OK});}" />
                    </Listeners>
                </ext:Button>
                <ext:Button ID="Button6" runat="server" Text="Cancelar"  OnClientClick="AppGlobalJs.closeWin(#{winObs})">
                    <Listeners>                     
                    </Listeners>
                </ext:Button>
            </Buttons>
            <Listeners>
                <BeforeHide Handler="#{forPanelObs}.getForm().reset();"></BeforeHide>              
            </Listeners>
        </ext:Window>
        <ext:Window 
            ID="winAddInforme" 
            runat="server"            
            Icon="ReportEdit"
            Height="200" 
            Width="350"
            ButtonAlign="Center"
            BodyStyle="background-color: #fff;" 
            BodyPadding="5"            
            hidden="true" 
            closeaction="Hide">
            <Content>
                <ext:FormPanel 
                    ID="FormPanel3" 
                    Border="false"
                    runat="server"
                    Width="330"            
                    BodyPadding="5"
                    Layout="Form">
                     <Defaults>
                <ext:Parameter Name="anchor" Value="95%" Mode="Value" />
                <ext:Parameter Name="allowBlank" Value="false" Mode="Raw" />
                <ext:Parameter Name="msgTarget" Value="side" Mode="Value" />
            </Defaults>
            <Items>
                <ext:TextField ID="TextField1" runat="server" FieldLabel="Nombre" />
                <ext:FileUploadField 
                    ID="FileUploadField2" 
                    runat="server" 
                    EmptyText="Seleccione documento"
                    FieldLabel="Documento"
                    ButtonText=""
                    Icon="ImageAdd"
                    />
                <ext:TextArea ID="TextArea1" runat="server" FieldLabel="Descripción" />
                </Items>
                    <Listeners>
                        <ValidityChange Handler="#{btnWinDocOk}.setDisabled(!valid);" />
                    </Listeners>
                </ext:FormPanel>
            </Content>
            <Buttons>
                  <ext:Button ID="Button4" runat="server" Text="Aceptar" Disabled="true">
                    <DirectEvents>
                        <Click 
                            OnEvent="UploadClick"
                            Before="if (!#{forPanelDoc}.getForm().isValid()) { return false; } 
                                Ext.Msg.wait('Uploading your photo...', 'Uploading');"
                                
                            Failure="Ext.Msg.show({ 
                                title   : 'Error', 
                                msg     : 'Error during uploading', 
                                minWidth: 200, 
                                modal   : true, 
                                icon    : Ext.Msg.ERROR, 
                                buttons : Ext.Msg.OK 
                            });">
                            <EventMask ShowMask="True"></EventMask>
                        </Click>
                    </DirectEvents>
                </ext:Button>
                  <ext:Button ID="Button5" runat="server" Text="Aceptar"  OnClientClick="AppGlobalJs.closeWin(#{winAddInforme})">
                    <Listeners>                     
                    </Listeners>
                </ext:Button>
            </Buttons>
            <Listeners>
                <BeforeHide Handler="#{forPanelDoc}.getForm().reset();"></BeforeHide>              
            </Listeners>
        </ext:Window>
        </Items>
   </ext:Viewport>
    <ext:XScript ID="XScript1" runat="server">
    <script language="javascript" type="text/javascript">
        var pgFn = new Object();
        pgFn.presentaMensaje = true;
        pgFn.PrepareProrroga = function () {

        };
        pgFn.Test = function () {
            alert("OK");
        };
        AppGlobalJs.showWin = function (objwin) {
            objwin.show();
        };
        AppGlobalJs.closeWin = function (objwin) {
            objwin.hide();
        };
        pgFn.menuItemClick = function (menu, item) {
            App.PnlCenter.body.update(Ext.String.format("Clicked: {0}", item.text)).highlight();
        };
 </script>
</ext:XScript>     
</body>


</html>
 



